import request from "@/utils/request";

// 查询操作指南列表
export function listInstruction(query) {
  return request({
    url: "/operate/instruction/list",
    method: "get",
    params: query,
  });
}

// 查询操作指南详细
export function getInstruction(id) {
  return request({
    url: "/operate/instruction/" + id,
    method: "get",
  });
}

// 新增操作指南
export function addInstruction(data) {
  return request({
    url: "/operate/instruction",
    method: "post",
    data: data,
  });
}

// 修改操作指南
export function updateInstruction(data) {
  return request({
    url: "/operate/instruction",
    method: "put",
    data: data,
  });
}

// 删除操作指南
export function delInstruction(id) {
  return request({
    url: "/operate/instruction/" + id,
    method: "delete",
  });
}

// 操作指南树形获取
export function getInstructionTree(params) {
  return request({
    url: "operate/instruction/instructionTree",
    method: "get",
    params: params,
  });
}
